<?php
$vkId = $_GET['vkId'];
include_once("php/ErrorHandler.php");
include_once("php/DbManager.php");
include_once("php/DbBridge.php");
ErrorHandler::setErrorHandling();
$db = new DbBridge();
$dbManager = new DbManager();
$db->connect();
$user = $dbManager->getUserByVkId($db, $vkId);
if (!$user) {
	$errors = $dbManager->getErrors();
	echo "error: ".$errors[0];
}
$user['achievement'] = '';
echo json_encode($user);
$db->disconnect();
?>